package com.woniu.his.app.service.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniu.his.app.common.enums.AppStatusEnums;
import com.woniu.his.app.infra.mapper.RegistrationTimeQuantumMapper;
import com.woniu.his.app.infra.model.RegistrationTimeQuantum;
import com.woniu.his.app.service.service.RegistrationTimeQuantumService;
import com.woniu.his.app.service.service.param.AddRegistrationTimeServiceQuantumParam;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 挂号时间段表 服务实现类
 * </p>
 *
 * @author dx
 * @since 2022-11-26
 */
@Service
public class RegistrationTimeQuantumServiceImpl extends ServiceImpl<RegistrationTimeQuantumMapper, RegistrationTimeQuantum> implements RegistrationTimeQuantumService {

    @Override
    public void addRegistrationTimeQuantum(AddRegistrationTimeServiceQuantumParam serviceParam) {

        String timeQuantum=serviceParam.getStartTime()+"-"+serviceParam.getEndTime();
        RegistrationTimeQuantum one=new RegistrationTimeQuantum();
        one.setTimeQuantum(timeQuantum);
        one.setTimeQuantumStatus(AppStatusEnums.ON.getCode());
        save(one);
    }
}
